
R version 3.3.0 (2016-05-03) -- "Supposedly Educational"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> ###############################################
> ### MLMA Anlayses for R&R in PSRM           ###
> ### - MASTER file to replicate all analyses ###
> ###############################################
> 
> ## set working directory
> rm(list=ls())
> setwd("~/Dropbox/Shared/Personality_meta-analysis/MLMA_code")
> 
> ## Install required packages
> pkg <- c("rstan","dplyr","haven","ggplot2","stargazer","lme4")
> inst <- pkg %in% installed.packages()
> if (length(pkg[!inst]) > 0) install.packages(pkg[!inst])
> 
> ## model estimation
> source("MLMA_estimation.R", echo=T, max.deparse.length=10000)

> rm(list = ls())

> library(rstan)
Loading required package: ggplot2
Loading required package: StanHeaders
rstan (Version 2.12.1, packaged: 2016-09-11 13:07:50 UTC, GitRev: 85f7a56811da)
For execution on a local, multicore CPU with excess RAM we recommend calling
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())

> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union


> library(haven)

> rstan_options(auto_write = TRUE)

> options(mc.cores = parallel::detectCores())

> rerun <- T

> raw <- read_dta("mlma_data.dta") %>% mutate(svo2 = (svo2 - 
+     ifelse(svo2 == 1 & study %in% unique(study[svo1 != svo2]), 
+         0.5, 0)) * ifelse(study %in% unique(study[svo1 != svo2]), 
+     2, 1), svoD1 = as.numeric(svo1 >= 0.5), svoD2 = as.numeric(svo1 > 
+     0.5))

> dat1 <- raw %>% select(study, extro, open, agree, 
+     conscien, payment, hilbig, benner, mbti, coop, svo1, svo2, 
+     svoD1, svoD2) %>% filter(study %in% 3:20) %>% mutate(study = as.numeric(as.factor(study))) %>% 
+     na.omit()

> dat2 <- raw %>% select(study, extro, open, agree, 
+     conscien, neuro, payment, hilbig, benner, coop, svo1, svo2, 
+     svoD1, svoD2) %>% filter(study %in% c(3:8, 12:20)) %>% mutate(study = as.numeric(as.factor(study))) %>% 
+     na.omit()

> dat3 <- raw %>% select(study, payment, hilbig, benner, 
+     coop, svo1, svo2, svoD1, svoD2) %>% mutate(study = as.numeric(as.factor(study)))

> summary(dat1)
     study           extro             open            agree       
 Min.   : 1.00   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.: 3.00   1st Qu.:0.5000   1st Qu.:0.5312   1st Qu.:0.4062  
 Median : 4.00   Median :0.6406   Median :0.6562   Median :0.5312  
 Mean   : 5.51   Mean   :0.6079   Mean   :0.6155   Mean   :0.5297  
 3rd Qu.: 7.00   3rd Qu.:0.7442   3rd Qu.:0.7500   3rd Qu.:0.6667  
 Max.   :12.00   Max.   :1.0000   Max.   :1.0000   Max.   :1.0000  
    conscien         payment           hilbig           benner      
 Min.   :0.0000   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.5208   1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.:0.0000  
 Median :0.6250   Median :0.0000   Median :0.0000   Median :0.0000  
 Mean   :0.6089   Mean   :0.3503   Mean   :0.4872   Mean   :0.2318  
 3rd Qu.:0.7344   3rd Qu.:1.0000   3rd Qu.:1.0000   3rd Qu.:0.0000  
 Max.   :1.0000   Max.   :1.0000   Max.   :1.0000   Max.   :1.0000  
      mbti             coop             svo1             svo2       
 Min.   :0.0000   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.:0.1333   1st Qu.:0.2000  
 Median :0.0000   Median :0.0000   Median :0.4750   Median :0.6000  
 Mean   :0.1136   Mean   :0.3485   Mean   :0.4624   Mean   :0.5678  
 3rd Qu.:0.0000   3rd Qu.:1.0000   3rd Qu.:0.7000   3rd Qu.:1.0000  
 Max.   :1.0000   Max.   :1.0000   Max.   :1.0000   Max.   :1.0000  
     svoD1            svoD2       
 Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.0000   1st Qu.:0.0000  
 Median :0.0000   Median :0.0000  
 Mean   :0.4899   Mean   :0.3924  
 3rd Qu.:1.0000   3rd Qu.:1.0000  
 Max.   :1.0000   Max.   :1.0000  

> summary(dat2)
     study            extro             open            agree       
 Min.   : 1.000   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.: 3.000   1st Qu.:0.5208   1st Qu.:0.5469   1st Qu.:0.4375  
 Median : 4.000   Median :0.6400   Median :0.6562   Median :0.5469  
 Mean   : 4.674   Mean   :0.6215   Mean   :0.6293   Mean   :0.5439  
 3rd Qu.: 6.000   3rd Qu.:0.7292   3rd Qu.:0.7344   3rd Qu.:0.6625  
 Max.   :10.000   Max.   :1.0000   Max.   :1.0000   Max.   :1.0000  
    conscien          neuro           payment          hilbig      
 Min.   :0.0000   Min.   :0.0000   Min.   :0.000   Min.   :0.0000  
 1st Qu.:0.5312   1st Qu.:0.4125   1st Qu.:0.000   1st Qu.:0.0000  
 Median :0.6250   Median :0.5312   Median :0.000   Median :1.0000  
 Mean   :0.6170   Mean   :0.5228   Mean   :0.267   Mean   :0.5497  
 3rd Qu.:0.7188   3rd Qu.:0.6406   3rd Qu.:1.000   3rd Qu.:1.0000  
 Max.   :1.0000   Max.   :1.0000   Max.   :1.000   Max.   :1.0000  
     benner            coop            svo1             svo2       
 Min.   :0.0000   Min.   :0.000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.0000   1st Qu.:0.000   1st Qu.:0.1111   1st Qu.:0.2000  
 Median :0.0000   Median :0.000   Median :0.4500   Median :0.5500  
 Mean   :0.2615   Mean   :0.369   Mean   :0.4491   Mean   :0.5353  
 3rd Qu.:1.0000   3rd Qu.:1.000   3rd Qu.:0.7000   3rd Qu.:1.0000  
 Max.   :1.0000   Max.   :1.000   Max.   :1.0000   Max.   :1.0000  
     svoD1            svoD2       
 Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.0000   1st Qu.:0.0000  
 Median :0.0000   Median :0.0000  
 Mean   :0.4619   Mean   :0.3735  
 3rd Qu.:1.0000   3rd Qu.:1.0000  
 Max.   :1.0000   Max.   :1.0000  

> summary(dat3)
     study           payment          hilbig           benner      
 Min.   : 1.000   Min.   :0.000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.: 4.000   1st Qu.:0.000   1st Qu.:0.0000   1st Qu.:0.0000  
 Median : 5.000   Median :0.000   Median :0.0000   Median :0.0000  
 Mean   : 6.658   Mean   :0.415   Mean   :0.4388   Mean   :0.2087  
 3rd Qu.: 9.000   3rd Qu.:1.000   3rd Qu.:1.0000   3rd Qu.:0.0000  
 Max.   :15.000   Max.   :1.000   Max.   :1.0000   Max.   :1.0000  
      coop             svo1             svo2            svoD1       
 Min.   :0.0000   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
 1st Qu.:0.0000   1st Qu.:0.1111   1st Qu.:0.2000   1st Qu.:0.0000  
 Median :0.0000   Median :0.4500   Median :0.5978   Median :0.0000  
 Mean   :0.3396   Mean   :0.4502   Mean   :0.5563   Mean   :0.4662  
 3rd Qu.:1.0000   3rd Qu.:0.6750   3rd Qu.:1.0000   3rd Qu.:1.0000  
 Max.   :1.0000   Max.   :1.0000   Max.   :1.0000   Max.   :1.0000  
     svoD2       
 Min.   :0.0000  
 1st Qu.:0.0000  
 Median :0.0000  
 Mean   :0.3751  
 3rd Qu.:1.0000  
 Max.   :1.0000  

> if (rerun == F) load("results.Rdata")

> if (rerun) {
+     X <- dat1 %>% select(extro, open, agree, conscien)
+     Z <- dat1 %>% select(payment, hilbig, benner, mbti, coop) %>% 
+         aggregate(list(study = dat1$study), mean)
+     Z <- cbind(1, Z[, -1])
+     m1dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), nZ = ncol(Z), 
+         X = as.matrix(X), Z = as.matrix(Z), svo = dat1$svo1, 
+         study = dat1$study)
+     m1stan <- stan(file = "mlma.stan", data = m1dl, pars = c("beta", 
+         "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=9874 on localhost:11413 at 19:26:43.639
starting worker pid=9883 on localhost:11413 at 19:26:43.755
starting worker pid=9892 on localhost:11413 at 19:26:43.872
starting worker pid=9901 on localhost:11413 at 19:26:43.989

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.2209 seconds (Warm-up)
#                28.6567 seconds (Sampling)
#                71.8776 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     4
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 46.9401 seconds (Warm-up)
#                31.9187 seconds (Sampling)
#                78.8588 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.1327 seconds (Warm-up)
#                37.8191 seconds (Sampling)
#                80.9518 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 35.5852 seconds (Warm-up)
#                50.7245 seconds (Sampling)
#                86.3097 seconds (Total)
# 

> print(m1stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.02    0.00 0.04 -0.10 -0.05 -0.02  0.01  0.06   945 1.00
beta[2]   0.14    0.00 0.04  0.06  0.11  0.14  0.17  0.22   687 1.00
beta[3]   0.13    0.00 0.04  0.04  0.10  0.13  0.16  0.21   903 1.00
beta[4]  -0.05    0.00 0.04 -0.13 -0.08 -0.05 -0.02  0.03   667 1.01
gamma[1]  0.17    0.01 0.17 -0.20  0.07  0.17  0.27  0.49   734 1.00
gamma[2]  0.17    0.00 0.14 -0.10  0.08  0.17  0.25  0.45  1063 1.00
gamma[3]  0.23    0.01 0.17 -0.11  0.12  0.22  0.33  0.59   864 1.00
gamma[4] -0.09    0.01 0.19 -0.45 -0.20 -0.09  0.03  0.27   968 1.00
gamma[5]  0.14    0.01 0.18 -0.22  0.02  0.13  0.25  0.50  1068 1.00
gamma[6]  0.02    0.01 0.15 -0.27 -0.07  0.02  0.11  0.32   832 1.00

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:28:12 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- dat2 %>% select(extro, open, agree, conscien, neuro)
+     Z <- dat2 %>% select(payment, hilbig, benner, coop) %>% aggregate(list(study = dat2$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m2dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), nZ = ncol(Z), 
+         X = as.matrix(X), Z = as.matrix(Z), svo = dat2$svo1, 
+         study = dat2$study)
+     m2stan <- stan(file = "mlma.stan", data = m2dl, pars = c("beta", 
+         "gamma"), iter = 20000, thin = 20)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10026 on localhost:11413 at 19:28:12.623
starting worker pid=10035 on localhost:11413 at 19:28:12.747
starting worker pid=10044 on localhost:11413 at 19:28:12.868
starting worker pid=10053 on localhost:11413 at 19:28:12.984

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:     1 / 20000 [  0%]  (Warmup)
Chain 3, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 4, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 2, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 1, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 3, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 1, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 4, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 2, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 3, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 1, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 4, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 2, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 3, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 2, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 1, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 4, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 3, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 3, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 2, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 2, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 1, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 1, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 4, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 4, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 3, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 2, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 4, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 1, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 3, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 2, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 4, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 1, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 3, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 2, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 4, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 3, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 1, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 2, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 3, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 91.361 seconds (Warm-up)
#                84.2317 seconds (Sampling)
#                175.593 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 1, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 2, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 92.3765 seconds (Warm-up)
#                91.911 seconds (Sampling)
#                184.288 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 93.1086 seconds (Warm-up)
#                95.0708 seconds (Sampling)
#                188.179 seconds (Total)
# 

Chain 1, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 94.7196 seconds (Warm-up)
#                104.821 seconds (Sampling)
#                199.541 seconds (Total)
# 

> print(m2stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=20000; warmup=10000; thin=20; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.06    0.00 0.05 -0.15 -0.09 -0.06 -0.03  0.03  1491    1
beta[2]   0.23    0.00 0.05  0.13  0.20  0.23  0.27  0.33  1439    1
beta[3]   0.16    0.00 0.05  0.06  0.13  0.16  0.20  0.27  1265    1
beta[4]  -0.07    0.00 0.05 -0.17 -0.10 -0.07 -0.04  0.03  1573    1
beta[5]  -0.05    0.00 0.05 -0.14 -0.08 -0.05 -0.02  0.04  1180    1
gamma[1]  0.15    0.01 0.19 -0.25  0.03  0.15  0.26  0.56   963    1
gamma[2]  0.17    0.00 0.15 -0.12  0.09  0.18  0.26  0.47  1319    1
gamma[3]  0.22    0.01 0.18 -0.17  0.12  0.23  0.33  0.59  1120    1
gamma[4] -0.09    0.01 0.21 -0.49 -0.20 -0.09  0.03  0.33  1401    1
gamma[5]  0.03    0.00 0.16 -0.29 -0.06  0.03  0.13  0.36  1406    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:31:34 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- matrix(0, nrow = nrow(dat3))
+     Z <- dat3 %>% select(payment, coop) %>% aggregate(list(study = dat3$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m3dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), nZ = ncol(Z), 
+         X = as.matrix(X), Z = as.matrix(Z), svo = dat3$svo1, 
+         study = dat3$study)
+     m3stan <- stan(file = "mlma.stan", data = m3dl, pars = c("beta", 
+         "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10206 on localhost:11413 at 19:31:34.966
starting worker pid=10215 on localhost:11413 at 19:31:35.087
starting worker pid=10224 on localhost:11413 at 19:31:35.208
starting worker pid=10233 on localhost:11413 at 19:31:35.326

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 34.6814 seconds (Warm-up)
#                21.0807 seconds (Sampling)
#                55.7622 seconds (Total)
# 

Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 46.648 seconds (Warm-up)
#                25.4658 seconds (Sampling)
#                72.1137 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 37.4549 seconds (Warm-up)
#                34.2395 seconds (Sampling)
#                71.6944 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 37.5425 seconds (Warm-up)
#                88.0252 seconds (Sampling)
#                125.568 seconds (Total)
# 

> print(m3stan, pars = c("gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

         mean se_mean   sd  2.5%   25%  50%  75% 97.5% n_eff Rhat
gamma[1] 0.39       0 0.09  0.21  0.34 0.40 0.45  0.58  1178    1
gamma[2] 0.04       0 0.10 -0.15 -0.02 0.04 0.11  0.24  1146    1
gamma[3] 0.00       0 0.10 -0.21 -0.07 0.00 0.06  0.19  1133    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:33:43 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     m4stan <- list(NULL)
+     for (i in unique(dat1$study)) {
+         dat4 <- dat1 %>% filter(study != i) %>% mutate(study = as.numeric(as.factor(study)))
+         X <- dat4 %>% select(extro, open, agree, conscien)
+         Z <- dat4 %>% select(payment, hilbig, benner, mbti, coop) %>% 
+             aggregate(list(study = dat4$study), mean)
+         Z <- cbind(1, Z[, -1])
+         m4dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+             nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), 
+             svo = dat4$svo1, study = dat4$study)
+         m4stan[[i]] <- stan(file = "mlma.stan", data = m4dl, 
+             pars = c("beta", "gamma"), iter = 10000, thin = 10)
+     }
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10324 on localhost:11413 at 19:33:43.621
starting worker pid=10333 on localhost:11413 at 19:33:43.736
starting worker pid=10342 on localhost:11413 at 19:33:43.856
starting worker pid=10351 on localhost:11413 at 19:33:43.980

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 49.3169 seconds (Warm-up)
#                38.3113 seconds (Sampling)
#                87.6282 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 49.843 seconds (Warm-up)
#                41.7097 seconds (Sampling)
#                91.5527 seconds (Total)
# 

Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 48.6672 seconds (Warm-up)
#                69.1169 seconds (Sampling)
#                117.784 seconds (Total)
# 

Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 49.4309 seconds (Warm-up)
#                172.226 seconds (Sampling)
#                221.657 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10408 on localhost:11413 at 19:37:29.144
starting worker pid=10417 on localhost:11413 at 19:37:29.266
starting worker pid=10426 on localhost:11413 at 19:37:29.391
starting worker pid=10435 on localhost:11413 at 19:37:29.510

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 48.2515 seconds (Warm-up)
#                33.3162 seconds (Sampling)
#                81.5677 seconds (Total)
# 

Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 51.8787 seconds (Warm-up)
#                35.9626 seconds (Sampling)
#                87.8413 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     4
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 51.4864 seconds (Warm-up)
#                40.136 seconds (Sampling)
#                91.6225 seconds (Total)
# 

Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 59.2675 seconds (Warm-up)
#                94.271 seconds (Sampling)
#                153.538 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10491 on localhost:11413 at 19:40:06.429
starting worker pid=10500 on localhost:11413 at 19:40:06.543
starting worker pid=10509 on localhost:11413 at 19:40:06.658
starting worker pid=10518 on localhost:11413 at 19:40:06.775

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 29.2438 seconds (Warm-up)
#                22.833 seconds (Sampling)
#                52.0768 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 30.2263 seconds (Warm-up)
#                25.1579 seconds (Sampling)
#                55.3842 seconds (Total)
# 

Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 33.5761 seconds (Warm-up)
#                26.5014 seconds (Sampling)
#                60.0776 seconds (Total)
# 

Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 31.1327 seconds (Warm-up)
#                46.8563 seconds (Sampling)
#                77.989 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10541 on localhost:11413 at 19:41:26.784
starting worker pid=10550 on localhost:11413 at 19:41:26.900
starting worker pid=10559 on localhost:11413 at 19:41:27.019
starting worker pid=10568 on localhost:11413 at 19:41:27.138

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 28.776 seconds (Warm-up)
#                33.8836 seconds (Sampling)
#                62.6596 seconds (Total)
# 

Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 33.485 seconds (Warm-up)
#                31.3255 seconds (Sampling)
#                64.8106 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 37.8314 seconds (Warm-up)
#                28.7313 seconds (Sampling)
#                66.5628 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 37.0633 seconds (Warm-up)
#                33.6511 seconds (Sampling)
#                70.7145 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     4
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10591 on localhost:11413 at 19:42:41.166
starting worker pid=10600 on localhost:11413 at 19:42:41.291
starting worker pid=10609 on localhost:11413 at 19:42:41.406
starting worker pid=10618 on localhost:11413 at 19:42:41.550

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 46.1174 seconds (Warm-up)
#                37.0734 seconds (Sampling)
#                83.1908 seconds (Total)
# 

Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 48.1837 seconds (Warm-up)
#                36.8991 seconds (Sampling)
#                85.0828 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 47.8396 seconds (Warm-up)
#                43.4267 seconds (Sampling)
#                91.2664 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     4
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 48.7727 seconds (Warm-up)
#                45.221 seconds (Sampling)
#                93.9937 seconds (Total)
# 
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10656 on localhost:11413 at 19:44:18.326
starting worker pid=10665 on localhost:11413 at 19:44:18.445
starting worker pid=10674 on localhost:11413 at 19:44:18.562
starting worker pid=10683 on localhost:11413 at 19:44:18.678

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.7036 seconds (Warm-up)
#                35.2751 seconds (Sampling)
#                78.9787 seconds (Total)
# 

Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 49.4161 seconds (Warm-up)
#                35.3193 seconds (Sampling)
#                84.7354 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 48.4937 seconds (Warm-up)
#                77.4818 seconds (Sampling)
#                125.975 seconds (Total)
# 

Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 41.7007 seconds (Warm-up)
#                632.249 seconds (Sampling)
#                673.949 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10741 on localhost:11413 at 19:55:34.128
starting worker pid=10750 on localhost:11413 at 19:55:34.243
starting worker pid=10759 on localhost:11413 at 19:55:34.359
starting worker pid=10768 on localhost:11413 at 19:55:34.474

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 34.6094 seconds (Warm-up)
#                29.2057 seconds (Sampling)
#                63.8151 seconds (Total)
# 

Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 36.2147 seconds (Warm-up)
#                34.616 seconds (Sampling)
#                70.8307 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 30.8906 seconds (Warm-up)
#                46.8629 seconds (Sampling)
#                77.7534 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 33.3317 seconds (Warm-up)
#                47.158 seconds (Sampling)
#                80.4897 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10792 on localhost:11413 at 19:56:57.631
starting worker pid=10801 on localhost:11413 at 19:56:57.747
starting worker pid=10810 on localhost:11413 at 19:56:57.865
starting worker pid=10819 on localhost:11413 at 19:56:57.979

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 44.9411 seconds (Warm-up)
#                35.0156 seconds (Sampling)
#                79.9566 seconds (Total)
# 

Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.8439 seconds (Warm-up)
#                35.6757 seconds (Sampling)
#                79.5196 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 46.4734 seconds (Warm-up)
#                37.6057 seconds (Sampling)
#                84.0791 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 42.2729 seconds (Warm-up)
#                44.8134 seconds (Sampling)
#                87.0863 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10867 on localhost:11413 at 19:58:26.621
starting worker pid=10876 on localhost:11413 at 19:58:26.737
starting worker pid=10885 on localhost:11413 at 19:58:26.857
starting worker pid=10894 on localhost:11413 at 19:58:26.979

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 44.566 seconds (Warm-up)
#                32.9797 seconds (Sampling)
#                77.5457 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.1805 seconds (Warm-up)
#                36.3924 seconds (Sampling)
#                79.5729 seconds (Total)
# 

Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.4453 seconds (Warm-up)
#                44.9362 seconds (Sampling)
#                88.3815 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 45.6814 seconds (Warm-up)
#                42.7374 seconds (Sampling)
#                88.4187 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10916 on localhost:11413 at 19:59:57.494
starting worker pid=10925 on localhost:11413 at 19:59:57.611
starting worker pid=10934 on localhost:11413 at 19:59:57.728
starting worker pid=10943 on localhost:11413 at 19:59:57.849

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 
Chain 2, 7000Iteration:  / 700010000 /  [10000 70 [%]  70 (Sampling)%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 35.4121 seconds (Warm-up)
#                31.9681 seconds (Sampling)
#                67.3802 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.5782 seconds (Warm-up)
#                26.2228 seconds (Sampling)
#                69.801 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 41.8355 seconds (Warm-up)
#                33.2883 seconds (Sampling)
#                75.1237 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.3107 seconds (Warm-up)
#                102.097 seconds (Sampling)
#                145.408 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=10968 on localhost:11413 at 20:02:25.997
starting worker pid=10977 on localhost:11413 at 20:02:26.116
starting worker pid=10986 on localhost:11413 at 20:02:26.233
starting worker pid=10995 on localhost:11413 at 20:02:26.352

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 36.325 seconds (Warm-up)
#                35.7327 seconds (Sampling)
#                72.0577 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 37.1056 seconds (Warm-up)
#                37.6431 seconds (Sampling)
#                74.7487 seconds (Total)
# 

Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 37.9218 seconds (Warm-up)
#                48.9485 seconds (Sampling)
#                86.8703 seconds (Total)
# 

Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.6112 seconds (Warm-up)
#                53.2327 seconds (Sampling)
#                96.8439 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11018 on localhost:11413 at 20:04:06.385
starting worker pid=11027 on localhost:11413 at 20:04:06.506
starting worker pid=11036 on localhost:11413 at 20:04:06.628
starting worker pid=11045 on localhost:11413 at 20:04:06.746

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 46.0712 seconds (Warm-up)
#                33.0239 seconds (Sampling)
#                79.0951 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 44.5635 seconds (Warm-up)
#                37.5216 seconds (Sampling)
#                82.0851 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 44.8037 seconds (Warm-up)
#                53.5794 seconds (Sampling)
#                98.383 seconds (Total)
# 

Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 44.6981 seconds (Warm-up)
#                203.925 seconds (Sampling)
#                248.623 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

> lapply(m4stan, print, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.01    0.00 0.04 -0.10 -0.04 -0.01  0.02  0.07   836 1.00
beta[2]   0.13    0.00 0.04  0.04  0.10  0.13  0.16  0.21   611 1.00
beta[3]   0.12    0.00 0.04  0.03  0.09  0.12  0.15  0.21   954 1.00
beta[4]  -0.05    0.00 0.04 -0.13 -0.08 -0.05 -0.02  0.04   822 1.00
gamma[1]  0.14    0.01 0.24 -0.34 -0.01  0.14  0.29  0.61   475 1.01
gamma[2]  0.15    0.00 0.17 -0.20  0.05  0.15  0.25  0.49  1118 1.00
gamma[3]  0.24    0.01 0.21 -0.18  0.12  0.23  0.37  0.67   709 1.01
gamma[4] -0.04    0.01 0.25 -0.54 -0.20 -0.04  0.12  0.49   615 1.01
gamma[5]  0.18    0.01 0.26 -0.35  0.04  0.19  0.33  0.69   850 1.00
gamma[6]  0.07    0.01 0.20 -0.34 -0.07  0.06  0.20  0.47   569 1.01

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:37:28 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.01    0.00 0.04 -0.09 -0.04 -0.01  0.02  0.07   932 1.00
beta[2]   0.13    0.00 0.05  0.05  0.10  0.13  0.16  0.22   659 1.01
beta[3]   0.13    0.00 0.05  0.04  0.09  0.12  0.16  0.21   841 1.00
beta[4]  -0.05    0.00 0.04 -0.13 -0.08 -0.05 -0.02  0.04   734 1.00
gamma[1]  0.22    0.01 0.17 -0.10  0.11  0.23  0.33  0.57   685 1.01
gamma[2]  0.15    0.00 0.14 -0.14  0.07  0.15  0.23  0.42  1174 1.00
gamma[3]  0.26    0.01 0.17 -0.09  0.16  0.26  0.37  0.58  1005 1.00
gamma[4] -0.13    0.01 0.19 -0.51 -0.24 -0.13 -0.02  0.24   808 1.01
gamma[5]  0.11    0.01 0.18 -0.25  0.01  0.11  0.22  0.47   685 1.01
gamma[6] -0.04    0.01 0.15 -0.33 -0.13 -0.04  0.06  0.26   824 1.01

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:40:06 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.01    0.00 0.03 -0.08 -0.03 -0.01  0.01  0.05   944 1.00
beta[2]   0.10    0.00 0.04  0.03  0.08  0.10  0.12  0.17   659 1.00
beta[3]   0.10    0.00 0.04  0.03  0.08  0.10  0.13  0.17   861 1.00
beta[4]  -0.05    0.00 0.04 -0.12 -0.07 -0.05 -0.03  0.02   597 1.00
gamma[1]  0.18    0.01 0.23 -0.24  0.05  0.17  0.30  0.61   375 1.00
gamma[2]  0.17    0.01 0.17 -0.17  0.07  0.17  0.26  0.51   607 1.00
gamma[3]  0.19    0.01 0.21 -0.24  0.06  0.19  0.31  0.61   602 1.00
gamma[4] -0.06    0.01 0.24 -0.52 -0.18 -0.06  0.07  0.38   443 1.00
gamma[5]  0.15    0.01 0.21 -0.27  0.04  0.16  0.28  0.56   609 1.01
gamma[6]  0.05    0.01 0.19 -0.33 -0.05  0.06  0.16  0.41   458 1.00

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:41:26 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.01    0.00 0.05 -0.10 -0.04 -0.01  0.02  0.08   932    1
beta[2]   0.11    0.00 0.05  0.01  0.07  0.11  0.14  0.20   880    1
beta[3]   0.12    0.00 0.05  0.02  0.09  0.12  0.15  0.22  1145    1
beta[4]  -0.04    0.00 0.05 -0.14 -0.08 -0.05 -0.01  0.05   766    1
gamma[1]  0.26    0.01 0.23 -0.21  0.11  0.25  0.40  0.70   552    1
gamma[2]  0.15    0.01 0.16 -0.16  0.06  0.15  0.24  0.46   825    1
gamma[3]  0.12    0.01 0.26 -0.40 -0.04  0.12  0.27  0.63   680    1
gamma[4] -0.15    0.01 0.23 -0.63 -0.30 -0.15 -0.01  0.31   707    1
gamma[5]  0.11    0.01 0.21 -0.32 -0.01  0.11  0.23  0.53   819    1
gamma[6] -0.05    0.01 0.22 -0.45 -0.19 -0.06  0.07  0.38   617    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:42:41 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.04    0.00 0.04 -0.12 -0.07 -0.04 -0.01  0.05   771 1.01
beta[2]   0.16    0.00 0.05  0.08  0.13  0.16  0.20  0.25   823 1.00
beta[3]   0.15    0.00 0.05  0.05  0.12  0.15  0.18  0.24   698 1.00
beta[4]  -0.07    0.00 0.04 -0.15 -0.10 -0.07 -0.04  0.02   723 1.00
gamma[1]  0.15    0.01 0.19 -0.20  0.04  0.15  0.27  0.56   565 1.00
gamma[2]  0.17    0.00 0.15 -0.15  0.09  0.17  0.26  0.45   933 1.00
gamma[3]  0.22    0.01 0.18 -0.16  0.12  0.23  0.33  0.57   742 1.00
gamma[4] -0.08    0.01 0.20 -0.51 -0.20 -0.07  0.05  0.35   645 1.00
gamma[5]  0.05    0.01 0.22 -0.39 -0.07  0.04  0.17  0.47  1253 1.00
gamma[6]  0.04    0.01 0.16 -0.29 -0.05  0.04  0.14  0.36   735 1.01

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:44:18 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.02    0.00 0.04 -0.11 -0.05 -0.02  0.00  0.06   717 1.00
beta[2]   0.19    0.00 0.05  0.10  0.16  0.19  0.22  0.28   505 1.01
beta[3]   0.14    0.00 0.05  0.05  0.11  0.14  0.17  0.23   787 1.00
beta[4]  -0.05    0.00 0.04 -0.14 -0.08 -0.05 -0.02  0.03   691 1.00
gamma[1]  0.13    0.01 0.20 -0.29  0.02  0.13  0.25  0.52   464 1.01
gamma[2]  0.17    0.01 0.15 -0.14  0.08  0.17  0.26  0.48   775 1.00
gamma[3]  0.22    0.01 0.20 -0.18  0.11  0.22  0.32  0.62   586 1.01
gamma[4] -0.08    0.01 0.20 -0.51 -0.20 -0.08  0.03  0.32   817 1.01
gamma[5]  0.26    0.01 0.24 -0.21  0.11  0.26  0.40  0.76   884 1.00
gamma[6]  0.03    0.01 0.16 -0.30 -0.06  0.03  0.13  0.35   614 1.01

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:55:33 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]   0.00    0.00 0.04 -0.09 -0.03  0.00  0.03  0.08   979 1.00
beta[2]   0.14    0.00 0.05  0.04  0.10  0.14  0.17  0.23   777 1.01
beta[3]   0.10    0.00 0.05  0.00  0.07  0.10  0.13  0.19   664 1.01
beta[4]  -0.06    0.00 0.04 -0.15 -0.09 -0.06 -0.03  0.02   695 1.01
gamma[1]  0.15    0.01 0.22 -0.28  0.02  0.15  0.28  0.59   539 1.01
gamma[2]  0.22    0.01 0.19 -0.18  0.11  0.22  0.33  0.58   603 1.01
gamma[3]  0.24    0.01 0.21 -0.23  0.13  0.25  0.37  0.65   556 1.01
gamma[4]  0.01    0.01 0.28 -0.55 -0.15  0.02  0.18  0.56   905 1.00
gamma[5]  0.12    0.01 0.20 -0.29  0.01  0.12  0.23  0.53  1153 1.00
gamma[6]  0.04    0.01 0.16 -0.29 -0.06  0.04  0.13  0.38   767 1.01

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:56:57 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.02    0.00 0.04 -0.11 -0.05 -0.02  0.00  0.06   703    1
beta[2]   0.14    0.00 0.04  0.06  0.11  0.14  0.17  0.22   894    1
beta[3]   0.13    0.00 0.04  0.05  0.10  0.13  0.16  0.22  1282    1
beta[4]  -0.05    0.00 0.04 -0.13 -0.07 -0.05 -0.02  0.04   835    1
gamma[1]  0.10    0.01 0.19 -0.28 -0.01  0.10  0.21  0.51   605    1
gamma[2]  0.23    0.01 0.16 -0.10  0.14  0.23  0.32  0.53   850    1
gamma[3]  0.29    0.01 0.19 -0.10  0.18  0.30  0.41  0.68   614    1
gamma[4] -0.06    0.01 0.19 -0.45 -0.18 -0.06  0.05  0.33   761    1
gamma[5]  0.15    0.01 0.19 -0.22  0.04  0.14  0.25  0.53  1151    1
gamma[6]  0.01    0.01 0.15 -0.29 -0.08  0.00  0.09  0.32   742    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:58:26 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.02    0.00 0.05 -0.11 -0.05 -0.02  0.01  0.07   929    1
beta[2]   0.15    0.00 0.05  0.06  0.12  0.15  0.18  0.24   885    1
beta[3]   0.14    0.00 0.05  0.05  0.11  0.14  0.17  0.24   892    1
beta[4]  -0.06    0.00 0.04 -0.14 -0.09 -0.06 -0.03  0.03   625    1
gamma[1]  0.29    0.01 0.16 -0.05  0.19  0.29  0.39  0.59   586    1
gamma[2]  0.05    0.00 0.13 -0.21 -0.03  0.05  0.12  0.32  1046    1
gamma[3]  0.09    0.01 0.16 -0.23  0.00  0.09  0.17  0.41   830    1
gamma[4] -0.16    0.01 0.16 -0.46 -0.25 -0.16 -0.08  0.18   847    1
gamma[5]  0.13    0.00 0.14 -0.15  0.05  0.13  0.21  0.42   903    1
gamma[6]  0.04    0.00 0.12 -0.19 -0.03  0.03  0.10  0.30   933    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 19:59:57 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.04    0.00 0.04 -0.12 -0.07 -0.04 -0.01  0.04   827 1.00
beta[2]   0.14    0.00 0.05  0.05  0.11  0.14  0.17  0.23   722 1.00
beta[3]   0.13    0.00 0.05  0.04  0.10  0.13  0.17  0.23   876 1.00
beta[4]  -0.04    0.00 0.05 -0.13 -0.08 -0.04 -0.01  0.05   644 1.01
gamma[1]  0.14    0.01 0.21 -0.24  0.02  0.13  0.26  0.56   621 1.00
gamma[2]  0.22    0.01 0.19 -0.15  0.11  0.23  0.33  0.56   779 1.00
gamma[3]  0.25    0.01 0.21 -0.20  0.13  0.26  0.37  0.65   740 1.00
gamma[4] -0.16    0.01 0.24 -0.62 -0.30 -0.16 -0.02  0.32   841 1.00
gamma[5]  0.12    0.01 0.20 -0.27  0.01  0.12  0.24  0.52  1085 1.00
gamma[6]  0.03    0.01 0.15 -0.32 -0.06  0.03  0.12  0.33   878 1.00

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:02:25 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.02    0.00 0.04 -0.10 -0.05 -0.02  0.01  0.06   896 1.00
beta[2]   0.14    0.00 0.04  0.05  0.11  0.14  0.17  0.22   831 1.00
beta[3]   0.13    0.00 0.04  0.05  0.10  0.13  0.16  0.22   915 1.00
beta[4]  -0.04    0.00 0.04 -0.12 -0.07 -0.04 -0.01  0.04   771 1.00
gamma[1]  0.18    0.01 0.21 -0.21  0.05  0.18  0.31  0.59   534 1.00
gamma[2]  0.16    0.01 0.19 -0.20  0.05  0.16  0.26  0.56   772 1.00
gamma[3]  0.20    0.01 0.21 -0.23  0.09  0.21  0.33  0.61   541 1.01
gamma[4] -0.11    0.01 0.22 -0.55 -0.23 -0.10  0.02  0.30   573 1.01
gamma[5]  0.13    0.01 0.21 -0.29  0.02  0.14  0.25  0.54  1193 1.00
gamma[6]  0.00    0.01 0.17 -0.36 -0.10  0.01  0.11  0.34   806 1.00

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:04:06 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.01    0.00 0.04 -0.10 -0.04 -0.01  0.02  0.07   918 1.00
beta[2]   0.13    0.00 0.04  0.04  0.10  0.13  0.16  0.21   803 1.00
beta[3]   0.13    0.00 0.05  0.04  0.10  0.13  0.16  0.22   926 1.00
beta[4]  -0.04    0.00 0.04 -0.13 -0.07 -0.04 -0.02  0.04   797 1.00
gamma[1]  0.17    0.01 0.21 -0.23  0.04  0.16  0.30  0.60   620 1.00
gamma[2]  0.16    0.01 0.18 -0.22  0.06  0.16  0.27  0.50   819 1.01
gamma[3]  0.21    0.01 0.20 -0.19  0.09  0.21  0.34  0.61   822 1.00
gamma[4] -0.09    0.01 0.22 -0.56 -0.22 -0.09  0.04  0.33   806 1.00
gamma[5]  0.15    0.01 0.22 -0.29  0.02  0.15  0.27  0.60   612 1.00
gamma[6]  0.02    0.01 0.19 -0.36 -0.08  0.02  0.12  0.40   768 1.00

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:08:17 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).
[[1]]
NULL

[[2]]
NULL

[[3]]
NULL

[[4]]
NULL

[[5]]
NULL

[[6]]
NULL

[[7]]
NULL

[[8]]
NULL

[[9]]
NULL

[[10]]
NULL

[[11]]
NULL

[[12]]
NULL


> if (rerun) {
+     X <- dat1 %>% select(extro, open, agree, conscien)
+     Z <- dat1 %>% select(payment, hilbig, benner, mbti, coop) %>% 
+         aggregate(list(study = dat1$study), mean)
+     Z <- cbind(1, Z[, -1])
+     m5dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), nZ = ncol(Z), 
+         X = as.matrix(X), Z = as.matrix(Z), svo = dat1$svo1, 
+         study = dat1$study)
+     m5stan <- stan(file = "mlma_slope.stan", data = m5dl, iter = 10000, 
+         thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11081 on localhost:11413 at 20:08:17.726
starting worker pid=11090 on localhost:11413 at 20:08:17.845
starting worker pid=11099 on localhost:11413 at 20:08:17.968
starting worker pid=11108 on localhost:11413 at 20:08:18.084

SAMPLING FOR MODEL 'mlma_slope' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_slope' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_slope' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_slope' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 217.546 seconds (Warm-up)
               178.162 seconds (Sampling)
               395.708 seconds (Total)


Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 226.729 seconds (Warm-up)
               203.747 seconds (Sampling)
               430.476 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 31: normal_log: Scale parameter is 0, but must be > 0!     5
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 229.881 seconds (Warm-up)
               281.537 seconds (Sampling)
               511.418 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 31: normal_log: Scale parameter is 0, but must be > 0!     4
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 271.235 seconds (Warm-up)
               522.79 seconds (Sampling)
               794.025 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 35: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

> print(m5stan)
Inference for Stan model: mlma_slope.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

                     mean se_mean    sd    2.5%     25%     50%     75%   97.5%
beta0[1]             0.33    0.00  0.09    0.16    0.27    0.33    0.39    0.51
beta0[2]             0.30    0.00  0.09    0.11    0.24    0.29    0.36    0.47
beta0[3]             0.33    0.00  0.08    0.19    0.27    0.33    0.39    0.48
beta0[4]             0.35    0.01  0.09    0.18    0.29    0.35    0.41    0.52
beta0[5]             0.58    0.00  0.07    0.44    0.54    0.58    0.63    0.74
beta0[6]             0.53    0.00  0.07    0.38    0.48    0.53    0.58    0.67
beta0[7]             0.19    0.00  0.10    0.00    0.13    0.19    0.26    0.38
beta0[8]             0.24    0.00  0.12    0.03    0.17    0.23    0.31    0.50
beta0[9]             0.13    0.01  0.09   -0.05    0.07    0.13    0.20    0.30
beta0[10]            0.09    0.01  0.11   -0.12    0.01    0.09    0.17    0.31
beta0[11]            0.34    0.01  0.11    0.14    0.27    0.34    0.41    0.56
beta0[12]            0.36    0.01  0.09    0.21    0.29    0.36    0.41    0.52
beta_extro[1]       -0.04    0.00  0.09   -0.25   -0.09   -0.03    0.01    0.14
beta_extro[2]       -0.07    0.00  0.09   -0.26   -0.11   -0.05   -0.01    0.09
beta_extro[3]       -0.04    0.00  0.07   -0.18   -0.08   -0.04    0.00    0.09
beta_extro[4]       -0.03    0.00  0.07   -0.18   -0.07   -0.03    0.01    0.11
beta_extro[5]        0.04    0.00  0.08   -0.10   -0.02    0.02    0.08    0.23
beta_extro[6]       -0.04    0.00  0.07   -0.17   -0.08   -0.04    0.01    0.10
beta_extro[7]       -0.07    0.00  0.08   -0.25   -0.11   -0.06   -0.02    0.06
beta_extro[8]        0.03    0.01  0.12   -0.14   -0.04    0.01    0.07    0.33
beta_extro[9]       -0.05    0.00  0.08   -0.21   -0.09   -0.04   -0.01    0.10
beta_extro[10]       0.05    0.01  0.11   -0.11   -0.03    0.02    0.11    0.30
beta_extro[11]      -0.03    0.00  0.10   -0.25   -0.08   -0.02    0.04    0.17
beta_extro[12]      -0.03    0.00  0.08   -0.21   -0.08   -0.03    0.01    0.12
beta_open[1]         0.25    0.01  0.13    0.00    0.15    0.24    0.34    0.50
beta_open[2]         0.14    0.00  0.12   -0.09    0.06    0.14    0.21    0.39
beta_open[3]         0.31    0.00  0.09    0.13    0.25    0.32    0.37    0.50
beta_open[4]         0.33    0.01  0.11    0.13    0.26    0.33    0.41    0.54
beta_open[5]         0.06    0.00  0.09   -0.13    0.00    0.07    0.13    0.23
beta_open[6]        -0.08    0.00  0.10   -0.28   -0.14   -0.08   -0.01    0.12
beta_open[7]         0.13    0.00  0.10   -0.07    0.06    0.13    0.19    0.33
beta_open[8]         0.21    0.00  0.14   -0.06    0.13    0.21    0.30    0.48
beta_open[9]        -0.02    0.02  0.12   -0.28   -0.10   -0.01    0.07    0.20
beta_open[10]        0.15    0.01  0.13   -0.11    0.07    0.16    0.24    0.39
beta_open[11]        0.20    0.00  0.13   -0.05    0.12    0.20    0.27    0.45
beta_open[12]        0.24    0.01  0.14   -0.02    0.14    0.23    0.33    0.52
beta_agree[1]        0.15    0.00  0.08    0.00    0.10    0.15    0.19    0.34
beta_agree[2]        0.12    0.00  0.09   -0.07    0.07    0.12    0.17    0.29
beta_agree[3]        0.17    0.00  0.07    0.04    0.13    0.17    0.22    0.34
beta_agree[4]        0.14    0.00  0.07    0.01    0.10    0.14    0.19    0.30
beta_agree[5]        0.10    0.00  0.07   -0.06    0.06    0.11    0.15    0.24
beta_agree[6]        0.10    0.00  0.07   -0.07    0.05    0.10    0.14    0.23
beta_agree[7]        0.18    0.01  0.09    0.02    0.11    0.16    0.23    0.39
beta_agree[8]        0.14    0.00  0.09   -0.05    0.09    0.14    0.18    0.34
beta_agree[9]        0.07    0.00  0.09   -0.16    0.02    0.08    0.13    0.22
beta_agree[10]       0.12    0.00  0.08   -0.05    0.07    0.12    0.17    0.29
beta_agree[11]       0.12    0.00  0.09   -0.07    0.08    0.13    0.17    0.29
beta_agree[12]       0.12    0.00  0.08   -0.04    0.07    0.12    0.16    0.27
beta_conscien[1]    -0.05    0.00  0.07   -0.18   -0.09   -0.05   -0.01    0.10
beta_conscien[2]    -0.06    0.00  0.07   -0.20   -0.10   -0.05   -0.01    0.07
beta_conscien[3]    -0.05    0.00  0.06   -0.17   -0.09   -0.05   -0.01    0.07
beta_conscien[4]    -0.05    0.00  0.06   -0.17   -0.09   -0.05   -0.01    0.08
beta_conscien[5]    -0.03    0.00  0.06   -0.14   -0.07   -0.03    0.00    0.10
beta_conscien[6]    -0.05    0.00  0.06   -0.17   -0.09   -0.05   -0.01    0.06
beta_conscien[7]    -0.04    0.00  0.06   -0.17   -0.08   -0.04   -0.01    0.08
beta_conscien[8]    -0.05    0.00  0.08   -0.22   -0.09   -0.05    0.00    0.11
beta_conscien[9]    -0.05    0.00  0.06   -0.16   -0.09   -0.05   -0.01    0.07
beta_conscien[10]   -0.04    0.00  0.07   -0.18   -0.08   -0.04    0.00    0.09
beta_conscien[11]   -0.06    0.00  0.07   -0.23   -0.10   -0.06   -0.01    0.07
beta_conscien[12]   -0.05    0.00  0.07   -0.20   -0.09   -0.05   -0.01    0.09
mu_beta[1]          -0.02    0.00  0.05   -0.12   -0.06   -0.03    0.01    0.08
mu_beta[2]           0.16    0.00  0.07    0.03    0.12    0.16    0.21    0.29
mu_beta[3]           0.13    0.00  0.05    0.03    0.09    0.13    0.16    0.23
mu_beta[4]          -0.05    0.00  0.05   -0.14   -0.08   -0.05   -0.02    0.05
sigma_beta[1]        0.08    0.00  0.06    0.01    0.04    0.07    0.12    0.24
sigma_beta[2]        0.18    0.00  0.07    0.07    0.14    0.17    0.22    0.34
sigma_beta[3]        0.08    0.00  0.05    0.01    0.04    0.07    0.11    0.20
sigma_beta[4]        0.05    0.00  0.04    0.01    0.02    0.04    0.06    0.14
gamma[1]             0.18    0.00  0.14   -0.09    0.10    0.19    0.27    0.46
gamma[2]             0.14    0.01  0.12   -0.09    0.07    0.15    0.22    0.38
gamma[3]             0.14    0.01  0.14   -0.14    0.04    0.14    0.22    0.39
gamma[4]            -0.11    0.01  0.15   -0.43   -0.21   -0.11   -0.02    0.16
gamma[5]             0.22    0.00  0.13   -0.05    0.14    0.23    0.31    0.49
gamma[6]             0.01    0.00  0.11   -0.19   -0.05    0.01    0.07    0.25
sigma_beta0          0.08    0.01  0.06    0.01    0.04    0.07    0.12    0.22
sigma_svo            0.31    0.00  0.00    0.30    0.30    0.31    0.31    0.32
lp__              1637.04    1.52 18.42 1603.98 1624.32 1635.67 1648.89 1672.13
                  n_eff Rhat
beta0[1]            367 1.01
beta0[2]           1174 1.00
beta0[3]            459 1.01
beta0[4]            209 1.02
beta0[5]            816 1.00
beta0[6]           1499 1.00
beta0[7]           1272 1.01
beta0[8]           1521 1.00
beta0[9]            153 1.03
beta0[10]            96 1.04
beta0[11]           269 1.02
beta0[12]           119 1.03
beta_extro[1]       652 1.00
beta_extro[2]      1269 1.00
beta_extro[3]      1780 1.00
beta_extro[4]      1967 1.00
beta_extro[5]      1151 1.00
beta_extro[6]       986 1.01
beta_extro[7]      1693 1.00
beta_extro[8]       480 1.01
beta_extro[9]      1603 1.00
beta_extro[10]      417 1.01
beta_extro[11]      989 1.01
beta_extro[12]     1854 1.00
beta_open[1]        458 1.01
beta_open[2]       1845 1.00
beta_open[3]       1148 1.00
beta_open[4]        214 1.02
beta_open[5]        424 1.01
beta_open[6]       1471 1.00
beta_open[7]       1525 1.00
beta_open[8]       1858 1.00
beta_open[9]         56 1.06
beta_open[10]        83 1.05
beta_open[11]      2000 1.00
beta_open[12]        94 1.05
beta_agree[1]      2000 1.00
beta_agree[2]      1826 1.00
beta_agree[3]      1244 1.01
beta_agree[4]      1959 1.00
beta_agree[5]      1610 1.00
beta_agree[6]      1558 1.00
beta_agree[7]       146 1.03
beta_agree[8]      2000 1.00
beta_agree[9]      1243 1.00
beta_agree[10]     1794 1.01
beta_agree[11]     2000 1.00
beta_agree[12]     1513 1.00
beta_conscien[1]    382 1.01
beta_conscien[2]    611 1.01
beta_conscien[3]    931 1.01
beta_conscien[4]    421 1.01
beta_conscien[5]    646 1.01
beta_conscien[6]    280 1.01
beta_conscien[7]    723 1.00
beta_conscien[8]    595 1.00
beta_conscien[9]    555 1.01
beta_conscien[10]   427 1.01
beta_conscien[11]   517 1.01
beta_conscien[12]   665 1.00
mu_beta[1]         1706 1.00
mu_beta[2]          940 1.01
mu_beta[3]         1491 1.00
mu_beta[4]          401 1.01
sigma_beta[1]       497 1.01
sigma_beta[2]      1823 1.00
sigma_beta[3]       622 1.00
sigma_beta[4]       345 1.01
gamma[1]           1534 1.01
gamma[2]            158 1.03
gamma[3]            639 1.02
gamma[4]            307 1.01
gamma[5]           1006 1.00
gamma[6]           1755 1.00
sigma_beta0          72 1.04
sigma_svo          1901 1.00
lp__                147 1.03

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:21:33 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- dat1 %>% select(extro, open, agree, conscien)
+     Z <- dat1 %>% select(payment, hilbig, benner, mbti, coop) %>% 
+         aggregate(list(study = dat1$study), mean)
+     Z <- cbind(1, Z[, -1])
+     m1svo2dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat1$svo2, 
+         study = dat1$study)
+     m1svo2stan <- stan(file = "mlma.stan", data = m1svo2dl, pars = c("beta", 
+         "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11180 on localhost:11413 at 20:21:34.075
starting worker pid=11191 on localhost:11413 at 20:21:34.194
starting worker pid=11200 on localhost:11413 at 20:21:34.310
starting worker pid=11209 on localhost:11413 at 20:21:34.428

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 35.3463 seconds (Warm-up)
#                35.8542 seconds (Sampling)
#                71.2005 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 38.5096 seconds (Warm-up)
#                41.4338 seconds (Sampling)
#                79.9435 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 37.568 seconds (Warm-up)
#                43.1139 seconds (Sampling)
#                80.682 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 39.1897 seconds (Warm-up)
#                78.2739 seconds (Sampling)
#                117.464 seconds (Total)
# 

> print(m1svo2stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.03    0.00 0.05 -0.12 -0.06 -0.03  0.00  0.06  1049    1
beta[2]   0.19    0.00 0.05  0.09  0.15  0.19  0.22  0.28   820    1
beta[3]   0.14    0.00 0.05  0.05  0.11  0.14  0.17  0.24   754    1
beta[4]  -0.08    0.00 0.05 -0.18 -0.11 -0.08 -0.05  0.01   762    1
gamma[1]  0.25    0.01 0.18 -0.09  0.14  0.25  0.36  0.61   670    1
gamma[2]  0.15    0.00 0.14 -0.13  0.07  0.15  0.23  0.44  1059    1
gamma[3]  0.27    0.01 0.17 -0.09  0.16  0.27  0.37  0.60   831    1
gamma[4]  0.06    0.01 0.20 -0.32 -0.06  0.06  0.18  0.46   936    1
gamma[5]  0.34    0.01 0.18 -0.03  0.24  0.35  0.45  0.70   812    1
gamma[6] -0.08    0.00 0.15 -0.35 -0.16 -0.08  0.01  0.22   866    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:23:33 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- dat2 %>% select(extro, open, agree, conscien, neuro)
+     Z <- dat2 %>% select(payment, hilbig, benner, coop) %>% aggregate(list(study = dat2$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m2svo2dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat2$svo2, 
+         study = dat2$study)
+     m2svo2stan <- stan(file = "mlma.stan", data = m2svo2dl, pars = c("beta", 
+         "gamma"), iter = 20000, thin = 20)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11232 on localhost:11413 at 20:23:34.077
starting worker pid=11241 on localhost:11413 at 20:23:34.201
starting worker pid=11252 on localhost:11413 at 20:23:34.320
starting worker pid=11261 on localhost:11413 at 20:23:34.440

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:     1 / 20000 [  0%]  (Warmup)
Chain 3, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 2, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 1, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 4, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 3, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 1, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 4, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 2, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 3, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 4, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 1, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 2, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 3, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 2, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 4, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 1, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 3, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 3, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 2, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 2, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 1, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 1, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 4, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 4, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 3, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 4, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 2, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 3, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 1, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 4, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 2, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 3, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 4, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 2, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 3, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 4, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 1, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 3, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 73.9909 seconds (Warm-up)
#                76.8857 seconds (Sampling)
#                150.877 seconds (Total)
# 

Chain 4, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 81.6595 seconds (Warm-up)
#                71.4273 seconds (Sampling)
#                153.087 seconds (Total)
# 

Chain 2, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 1, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 2, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 82.0332 seconds (Warm-up)
#                86.8017 seconds (Sampling)
#                168.835 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 1, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 83.2349 seconds (Warm-up)
#                131.971 seconds (Sampling)
#                215.206 seconds (Total)
# 

> print(m2svo2stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=20000; warmup=10000; thin=20; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.06    0.00 0.06 -0.17 -0.10 -0.06 -0.02  0.05  1274    1
beta[2]   0.31    0.00 0.06  0.19  0.26  0.31  0.34  0.42  1365    1
beta[3]   0.19    0.00 0.06  0.07  0.16  0.20  0.23  0.31  1405    1
beta[4]  -0.10    0.00 0.06 -0.20 -0.14 -0.10 -0.06  0.01  1673    1
beta[5]  -0.03    0.00 0.05 -0.14 -0.07 -0.03  0.00  0.07  1243    1
gamma[1]  0.17    0.01 0.19 -0.21  0.06  0.17  0.28  0.54  1110    1
gamma[2]  0.16    0.00 0.14 -0.13  0.08  0.16  0.24  0.45  1523    1
gamma[3]  0.30    0.00 0.17 -0.05  0.19  0.30  0.40  0.64  1370    1
gamma[4]  0.07    0.01 0.20 -0.34 -0.04  0.07  0.18  0.45  1399    1
gamma[5] -0.06    0.00 0.16 -0.38 -0.15 -0.06  0.03  0.25  1369    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:27:11 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- matrix(0, nrow = nrow(dat3))
+     Z <- dat3 %>% select(payment, coop) %>% aggregate(list(study = dat3$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m3svo2dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat3$svo2, 
+         study = dat3$study)
+     m3svo2stan <- stan(file = "mlma.stan", data = m3svo2dl, pars = c("beta", 
+         "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11315 on localhost:11413 at 20:27:11.193
starting worker pid=11324 on localhost:11413 at 20:27:11.313
starting worker pid=11333 on localhost:11413 at 20:27:11.428
starting worker pid=11342 on localhost:11413 at 20:27:11.559

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 29.0079 seconds (Warm-up)
#                17.5313 seconds (Sampling)
#                46.5393 seconds (Total)
# 

Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 32.2286 seconds (Warm-up)
#                21.7266 seconds (Sampling)
#                53.9552 seconds (Total)
# 

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 26.9195 seconds (Warm-up)
#                32.3991 seconds (Sampling)
#                59.3186 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 30.8311 seconds (Warm-up)
#                477.617 seconds (Sampling)
#                508.448 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

> print(m3svo2stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.03    0.03 1.01 -2.02 -0.69 -0.04  0.63  1.96  1478    1
gamma[1]  0.57    0.00 0.10  0.36  0.51  0.57  0.64  0.76  1105    1
gamma[2]  0.05    0.00 0.11 -0.16 -0.03  0.04  0.11  0.28  1107    1
gamma[3] -0.17    0.00 0.11 -0.39 -0.24 -0.17 -0.09  0.06  1364    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:35:42 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- dat1 %>% select(extro, open, agree, conscien)
+     Z <- dat1 %>% select(payment, hilbig, benner, mbti, coop) %>% 
+         aggregate(list(study = dat1$study), mean)
+     Z <- cbind(1, Z[, -1])
+     m1svoD1dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat1$svoD1, 
+         study = dat1$study)
+     m1svoD1stan <- stan(file = "mlma_logit.stan", data = m1svoD1dl, 
+         pars = c("beta", "gamma"), iter = 10000, thin = 10)
+     m1svoD2dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat1$svoD2, 
+         study = dat1$study)
+     m1svoD2stan <- stan(file = "mlma_logit.stan", data = m1svoD2dl, 
+         pars = c("beta", "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11395 on localhost:11413 at 20:35:43.161
starting worker pid=11404 on localhost:11413 at 20:35:43.275
starting worker pid=11413 on localhost:11413 at 20:35:43.420
starting worker pid=11422 on localhost:11413 at 20:35:43.539

SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 35.7422 seconds (Warm-up)
               38.9847 seconds (Sampling)
               74.7269 seconds (Total)


Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 40.0595 seconds (Warm-up)
               46.8938 seconds (Sampling)
               86.9533 seconds (Total)


Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 40.2069 seconds (Warm-up)
               49.1739 seconds (Sampling)
               89.3808 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 23: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 41.092 seconds (Warm-up)
               49.1516 seconds (Sampling)
               90.2437 seconds (Total)

DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11446 on localhost:11413 at 20:37:15.487
starting worker pid=11455 on localhost:11413 at 20:37:15.603
starting worker pid=11464 on localhost:11413 at 20:37:15.720
starting worker pid=11473 on localhost:11413 at 20:37:15.835

SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 45.311 seconds (Warm-up)
               32.6207 seconds (Sampling)
               77.9317 seconds (Total)


Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 45.6652 seconds (Warm-up)
               54.9279 seconds (Sampling)
               100.593 seconds (Total)


Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 48.0763 seconds (Warm-up)
               57.0028 seconds (Sampling)
               105.079 seconds (Total)


Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 42.9706 seconds (Warm-up)
               410.53 seconds (Sampling)
               453.501 seconds (Total)


> print(m1svoD1stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma_logit.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.14    0.01 0.31 -0.71 -0.34 -0.14  0.07  0.50  1022    1
beta[2]   1.27    0.01 0.32  0.64  1.05  1.28  1.48  1.90   786    1
beta[3]   1.21    0.01 0.31  0.62  0.99  1.21  1.41  1.80  1041    1
beta[4]  -0.19    0.01 0.32 -0.79 -0.41 -0.19  0.01  0.47   870    1
gamma[1] -2.19    0.06 1.58 -5.18 -3.19 -2.24 -1.20  0.97   731    1
gamma[2]  1.36    0.05 1.34 -1.31  0.48  1.39  2.22  3.95   862    1
gamma[3]  1.29    0.05 1.55 -1.65  0.28  1.32  2.32  4.23   877    1
gamma[4] -0.79    0.05 1.65 -3.90 -1.82 -0.83  0.24  2.53  1123    1
gamma[5]  1.27    0.05 1.60 -2.16  0.34  1.30  2.27  4.47  1257    1
gamma[6] -0.62    0.04 1.33 -3.35 -1.43 -0.63  0.22  2.03   962    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:37:15 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> print(m1svoD2stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma_logit.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.10    0.01 0.31 -0.73 -0.30 -0.10  0.12  0.49   935 1.00
beta[2]   0.82    0.01 0.33  0.17  0.60  0.83  1.04  1.46   666 1.01
beta[3]   1.13    0.01 0.33  0.49  0.91  1.14  1.35  1.78   607 1.00
beta[4]   0.10    0.01 0.33 -0.54 -0.11  0.11  0.33  0.74   706 1.01
gamma[1] -2.90    0.07 1.88 -6.58 -4.16 -2.94 -1.69  0.88   683 1.01
gamma[2]  1.07    0.06 1.74 -2.53  0.02  1.08  2.13  4.54   833 1.00
gamma[3]  0.41    0.07 1.93 -3.47 -0.74  0.41  1.62  4.14   871 1.00
gamma[4] -0.65    0.07 2.10 -4.90 -1.94 -0.65  0.69  3.45  1031 1.01
gamma[5]  1.02    0.06 2.16 -3.25 -0.26  1.03  2.37  5.30  1194 1.00
gamma[6]  0.23    0.05 1.68 -3.14 -0.86  0.26  1.33  3.44  1029 1.01

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:44:52 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- dat2 %>% select(extro, open, agree, conscien, neuro)
+     Z <- dat2 %>% select(payment, hilbig, benner, coop) %>% aggregate(list(study = dat2$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m2svoD1dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat2$svoD1, 
+         study = dat2$study)
+     m2svoD1stan <- stan(file = "mlma_logit.stan", data = m2svoD1dl, 
+         pars = c("beta", "gamma"), iter = 20000, thin = 20)
+     m2svoD2dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat2$svoD2, 
+         study = dat2$study)
+     m2svoD2stan <- stan(file = "mlma_logit.stan", data = m2svoD2dl, 
+         pars = c("beta", "gamma"), iter = 20000, thin = 20)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11520 on localhost:11413 at 20:44:52.670
starting worker pid=11529 on localhost:11413 at 20:44:52.787
starting worker pid=11538 on localhost:11413 at 20:44:52.902
starting worker pid=11547 on localhost:11413 at 20:44:53.020

SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 1).

Chain 1, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 2).

Chain 2, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 3).

Chain 3, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 4).

Chain 4, Iteration:     1 / 20000 [  0%]  (Warmup)
Chain 2, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 1, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 3, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 4, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 2, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 1, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 3, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 4, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 2, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 1, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 3, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 4, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 2, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 1, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 3, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 4, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 2, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 2, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 1, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 1, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 3, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 3, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 4, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 4, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 1, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 2, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 3, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 4, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 1, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 2, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 3, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 1, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 4, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 2, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 1, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 3, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 4, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 1, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 76.1197 seconds (Warm-up)
               75.8936 seconds (Sampling)
               152.013 seconds (Total)


Chain 2, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 3, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 4, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 2, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 74.069 seconds (Warm-up)
               95.815 seconds (Sampling)
               169.884 seconds (Total)


Chain 3, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 76.3387 seconds (Warm-up)
               93.5271 seconds (Sampling)
               169.866 seconds (Total)


Chain 4, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 83.6491 seconds (Warm-up)
               93.9184 seconds (Sampling)
               177.568 seconds (Total)

DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11579 on localhost:11413 at 20:47:53.873
starting worker pid=11588 on localhost:11413 at 20:47:53.991
starting worker pid=11597 on localhost:11413 at 20:47:54.104
starting worker pid=11606 on localhost:11413 at 20:47:54.221

SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 1).

Chain 1, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 2).

Chain 2, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 3).

Chain 3, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 4).

Chain 4, Iteration:     1 / 20000 [  0%]  (Warmup)
Chain 1, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 4, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 3, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 2, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 1, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 3, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 2, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 4, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 1, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 3, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 2, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 4, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 3, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 1, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 2, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 4, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 3, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 3, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 1, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 1, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 2, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 2, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 4, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 4, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 3, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 1, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 2, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 4, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 3, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 1, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 2, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 4, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 3, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 1, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 2, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 4, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 3, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 1, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 2, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 4, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 3, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 79.9498 seconds (Warm-up)
               97.0504 seconds (Sampling)
               177 seconds (Total)


Chain 1, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 82.7456 seconds (Warm-up)
               100.75 seconds (Sampling)
               183.495 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 23: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 82.4949 seconds (Warm-up)
               108.806 seconds (Sampling)
               191.301 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 23: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 20000 / 20000 [100%]  (Sampling)
 Elapsed Time: 88.0606 seconds (Warm-up)
               103.676 seconds (Sampling)
               191.737 seconds (Total)


> print(m2svoD1stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma_logit.
4 chains, each with iter=20000; warmup=10000; thin=20; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.52    0.01 0.36 -1.22 -0.76 -0.52 -0.28  0.15  1384    1
beta[2]   1.92    0.01 0.37  1.19  1.69  1.93  2.17  2.63  1473    1
beta[3]   1.42    0.01 0.37  0.68  1.17  1.42  1.68  2.13  1520    1
beta[4]  -0.24    0.01 0.36 -0.92 -0.48 -0.25  0.01  0.47  1336    1
beta[5]  -0.36    0.01 0.33 -1.00 -0.58 -0.37 -0.13  0.32  1363    1
gamma[1] -2.61    0.04 1.51 -5.63 -3.55 -2.65 -1.71  0.63  1178    1
gamma[2]  1.43    0.03 1.26 -1.30  0.75  1.46  2.21  3.93  1551    1
gamma[3]  1.51    0.04 1.51 -1.66  0.65  1.56  2.42  4.48  1448    1
gamma[4] -0.59    0.04 1.64 -3.85 -1.56 -0.56  0.43  2.66  1535    1
gamma[5] -0.28    0.03 1.24 -2.87 -1.04 -0.26  0.45  2.14  1448    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:47:53 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> print(m2svoD2stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma_logit.
4 chains, each with iter=20000; warmup=10000; thin=20; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.33    0.01 0.40 -1.11 -0.60 -0.32 -0.06  0.46  1788    1
beta[2]   1.56    0.01 0.41  0.77  1.28  1.56  1.82  2.37  1294    1
beta[3]   1.32    0.01 0.41  0.55  1.05  1.31  1.59  2.16  1260    1
beta[4]   0.07    0.01 0.40 -0.68 -0.19  0.05  0.33  0.89  1527    1
beta[5]  -0.65    0.01 0.38 -1.44 -0.91 -0.64 -0.39  0.08  1309    1
gamma[1] -2.99    0.05 2.06 -7.02 -4.32 -3.06 -1.75  1.41  1551    1
gamma[2]  0.96    0.05 1.91 -3.05 -0.20  1.01  2.15  4.73  1780    1
gamma[3]  0.40    0.05 2.19 -4.12 -0.90  0.47  1.81  4.70  1691    1
gamma[4] -0.58    0.06 2.36 -5.48 -2.05 -0.54  0.90  3.97  1682    1
gamma[5]  0.36    0.05 1.88 -3.72 -0.78  0.45  1.57  4.00  1596    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:51:09 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- matrix(0, nrow = nrow(dat3))
+     Z <- dat3 %>% select(payment, coop) %>% aggregate(list(study = dat3$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m3svoD1dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat3$svoD1, 
+         study = dat3$study)
+     m3svoD1stan <- stan(file = "mlma_logit.stan", data = m3svoD1dl, 
+         pars = c("beta", "gamma"), iter = 10000, thin = 10)
+     m3svoD2dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat3$svoD2, 
+         study = dat3$study)
+     m3svoD2stan <- stan(file = "mlma_logit.stan", data = m3svoD2dl, 
+         pars = c("beta", "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11638 on localhost:11413 at 20:51:09.315
starting worker pid=11647 on localhost:11413 at 20:51:09.428
starting worker pid=11656 on localhost:11413 at 20:51:09.545
starting worker pid=11665 on localhost:11413 at 20:51:09.660

SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 27.2189 seconds (Warm-up)
               24.3877 seconds (Sampling)
               51.6066 seconds (Total)


Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 25.2392 seconds (Warm-up)
               27.3303 seconds (Sampling)
               52.5695 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 23: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 26.4329 seconds (Warm-up)
               28.1501 seconds (Sampling)
               54.5829 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 23: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 26.81 seconds (Warm-up)
               96.8805 seconds (Sampling)
               123.69 seconds (Total)

DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11694 on localhost:11413 at 20:53:14.883
starting worker pid=11703 on localhost:11413 at 20:53:14.998
starting worker pid=11712 on localhost:11413 at 20:53:15.114
starting worker pid=11721 on localhost:11413 at 20:53:15.240

SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma_logit' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 22.8204 seconds (Warm-up)
               21.5284 seconds (Sampling)
               44.3488 seconds (Total)


Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 24.232 seconds (Warm-up)
               21.0536 seconds (Sampling)
               45.2855 seconds (Total)


Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 23.7283 seconds (Warm-up)
               21.2329 seconds (Sampling)
               44.9612 seconds (Total)

The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 23: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)
 Elapsed Time: 23.8985 seconds (Warm-up)
               22.5792 seconds (Sampling)
               46.4776 seconds (Total)


> print(m3svoD1stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma_logit.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd   2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.31    0.13 5.00 -10.18 -3.65 -0.38  3.04  9.27  1586    1
gamma[1] -0.57    0.02 0.82  -2.14 -1.12 -0.58 -0.02  1.05  1333    1
gamma[2]  0.48    0.02 0.91  -1.23 -0.12  0.47  1.07  2.28  1464    1
gamma[3] -0.36    0.03 0.96  -2.30 -0.96 -0.36  0.26  1.55  1422    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:53:14 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> print(m3svoD2stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma_logit.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.08    0.13 4.86 -9.76 -3.13 -0.08  3.24  9.04  1501    1
gamma[1] -1.91    0.03 1.17 -4.22 -2.68 -1.91 -1.16  0.37  1157    1
gamma[2]  0.61    0.04 1.27 -1.99 -0.18  0.67  1.42  3.08  1256    1
gamma[3]  0.69    0.04 1.26 -1.79 -0.12  0.67  1.51  3.16  1280    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:54:04 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- dat1 %>% select(extro, open, agree, conscien)
+     Z <- dat1 %>% select(payment, hilbig, benner, mbti) %>% aggregate(list(study = dat1$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m1coop0dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat1$svo1, 
+         study = dat1$study)
+     m1coop0stan <- stan(file = "mlma.stan", data = m1coop0dl, 
+         pars = c("beta", "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11760 on localhost:11413 at 20:54:04.922
starting worker pid=11769 on localhost:11413 at 20:54:05.050
starting worker pid=11778 on localhost:11413 at 20:54:05.182
starting worker pid=11787 on localhost:11413 at 20:54:05.315

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 43.1397 seconds (Warm-up)
#                32.4537 seconds (Sampling)
#                75.5935 seconds (Total)
# 

Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 59.5037 seconds (Warm-up)
#                32.7924 seconds (Sampling)
#                92.2961 seconds (Total)
# 

Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 41.0641 seconds (Warm-up)
#                56.0498 seconds (Sampling)
#                97.1139 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 47.2881 seconds (Warm-up)
#                54.9994 seconds (Sampling)
#                102.288 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

> print(m1coop0stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.02       0 0.04 -0.09 -0.05 -0.02  0.01  0.06  1100    1
beta[2]   0.14       0 0.04  0.05  0.11  0.14  0.17  0.22   654    1
beta[3]   0.13       0 0.04  0.04  0.10  0.13  0.16  0.21   788    1
beta[4]  -0.05       0 0.04 -0.13 -0.08 -0.05 -0.03  0.03   525    1
gamma[1]  0.19       0 0.11 -0.04  0.11  0.19  0.27  0.41   594    1
gamma[2]  0.17       0 0.13 -0.08  0.08  0.17  0.24  0.42   851    1
gamma[3]  0.21       0 0.14 -0.07  0.11  0.21  0.29  0.50   839    1
gamma[4] -0.10       0 0.14 -0.41 -0.19 -0.10 -0.02  0.17  1210    1
gamma[5]  0.13       0 0.15 -0.17  0.04  0.13  0.21  0.43  1149    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 20:55:49 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- dat2 %>% select(extro, open, agree, conscien, neuro)
+     Z <- dat2 %>% select(payment, hilbig, benner) %>% aggregate(list(study = dat2$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m2coop0dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat2$svo1, 
+         study = dat2$study)
+     m2coop0stan <- stan(file = "mlma.stan", data = m2coop0dl, 
+         pars = c("beta", "gamma"), iter = 20000, thin = 20)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11812 on localhost:11413 at 20:55:49.878
starting worker pid=11821 on localhost:11413 at 20:55:49.996
starting worker pid=11830 on localhost:11413 at 20:55:50.112
starting worker pid=11839 on localhost:11413 at 20:55:50.228

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:     1 / 20000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:     1 / 20000 [  0%]  (Warmup)
Chain 4, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 1, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 3, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 2, Iteration:  2000 / 20000 [ 10%]  (Warmup)
Chain 1, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 3, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 4, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 2, Iteration:  4000 / 20000 [ 20%]  (Warmup)
Chain 1, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 3, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 4, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 2, Iteration:  6000 / 20000 [ 30%]  (Warmup)
Chain 1, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 4, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 3, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 2, Iteration:  8000 / 20000 [ 40%]  (Warmup)
Chain 1, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 1, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 4, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 4, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 3, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 3, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 2, Iteration: 10000 / 20000 [ 50%]  (Warmup)
Chain 2, Iteration: 10001 / 20000 [ 50%]  (Sampling)
Chain 1, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 4, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 3, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 1, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 3, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 4, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 3, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 1, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 4, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 3, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 1, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 4, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 2, Iteration: 12000 / 20000 [ 60%]  (Sampling)
Chain 3, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 85.5497 seconds (Warm-up)
#                65.3403 seconds (Sampling)
#                150.89 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     4
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 1, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 80.4664 seconds (Warm-up)
#                71.9457 seconds (Sampling)
#                152.412 seconds (Total)
# 

Chain 4, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 82.2184 seconds (Warm-up)
#                69.8117 seconds (Sampling)
#                152.03 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 2, Iteration: 14000 / 20000 [ 70%]  (Sampling)
Chain 2, Iteration: 16000 / 20000 [ 80%]  (Sampling)
Chain 2, Iteration: 18000 / 20000 [ 90%]  (Sampling)
Chain 2, Iteration: 20000 / 20000 [100%]  (Sampling)# 
#  Elapsed Time: 90.6476 seconds (Warm-up)
#                237.912 seconds (Sampling)
#                328.56 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

> print(m2coop0stan, pars = c("beta", "gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=20000; warmup=10000; thin=20; 
post-warmup draws per chain=500, total post-warmup draws=2000.

          mean se_mean   sd  2.5%   25%   50%   75% 97.5% n_eff Rhat
beta[1]  -0.06       0 0.05 -0.15 -0.09 -0.06 -0.03  0.03  1470    1
beta[2]   0.24       0 0.05  0.14  0.20  0.23  0.27  0.33  1140    1
beta[3]   0.16       0 0.05  0.06  0.13  0.16  0.20  0.27  1113    1
beta[4]  -0.07       0 0.05 -0.16 -0.10 -0.07 -0.04  0.03  1415    1
beta[5]  -0.05       0 0.05 -0.14 -0.09 -0.05 -0.02  0.04  1191    1
gamma[1]  0.17       0 0.13 -0.09  0.09  0.17  0.25  0.42   917    1
gamma[2]  0.17       0 0.13 -0.10  0.09  0.17  0.24  0.42  1659    1
gamma[3]  0.21       0 0.14 -0.09  0.12  0.21  0.30  0.51  1494    1
gamma[4] -0.12       0 0.15 -0.40 -0.20 -0.12 -0.03  0.17  1703    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 21:01:20 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     X <- matrix(0, nrow = nrow(dat3))
+     Z <- dat3 %>% select(payment) %>% aggregate(list(study = dat3$study), 
+         mean)
+     Z <- cbind(1, Z[, -1])
+     m3coop0dl <- list(n = nrow(X), m = nrow(Z), nX = ncol(X), 
+         nZ = ncol(Z), X = as.matrix(X), Z = as.matrix(Z), svo = dat3$svo1, 
+         study = dat3$study)
+     m3coop0stan <- stan(file = "mlma.stan", data = m3coop0dl, 
+         pars = c("beta", "gamma"), iter = 10000, thin = 10)
+ }
DIAGNOSTIC(S) FROM PARSER:
Warning (non-fatal): assignment operator <- deprecated in the Stan language; use = instead.

starting worker pid=11875 on localhost:11413 at 21:01:21.060
starting worker pid=11884 on localhost:11413 at 21:01:21.180
starting worker pid=11893 on localhost:11413 at 21:01:21.296
starting worker pid=11902 on localhost:11413 at 21:01:21.451

SAMPLING FOR MODEL 'mlma' NOW (CHAIN 1).

Chain 1, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 2).

Chain 2, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 3).

Chain 3, Iteration:    1 / 10000 [  0%]  (Warmup)
SAMPLING FOR MODEL 'mlma' NOW (CHAIN 4).

Chain 4, Iteration:    1 / 10000 [  0%]  (Warmup)
Chain 3, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 4, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 1, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 2, Iteration: 1000 / 10000 [ 10%]  (Warmup)
Chain 3, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 4, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 1, Iteration: 2000 / 10000 [ 20%]  (Warmup)
Chain 2, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 4, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 3, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 1, Iteration: 3000 / 10000 [ 30%]  (Warmup)
Chain 2, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 4, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 3, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 1, Iteration: 4000 / 10000 [ 40%]  (Warmup)
Chain 2, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 2, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 4, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 3, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 3, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 2, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 1, Iteration: 5000 / 10000 [ 50%]  (Warmup)
Chain 1, Iteration: 5001 / 10000 [ 50%]  (Sampling)
Chain 4, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 3, Iteration: 6000 / 10000 [ 60%]  (Sampling)
Chain 2, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 2, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 2, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 28.3986 seconds (Warm-up)
#                16.2215 seconds (Sampling)
#                44.6201 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 2
                                                                                count
Exception thrown at line 24: normal_log: Scale parameter is 0, but must be > 0!     1
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     1
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 7000 / 10000 [ 70%]  (Sampling)
Chain 1, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 4, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 3, Iteration: 8000 / 10000 [ 80%]  (Sampling)
Chain 1, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 1, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 33.5936 seconds (Warm-up)
#                22.98 seconds (Sampling)
#                56.5736 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 1
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     2
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 9000 / 10000 [ 90%]  (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 28.8532 seconds (Warm-up)
#                27.3913 seconds (Sampling)
#                56.2445 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 4
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

Chain 3, Iteration: 10000 / 10000 [100%]  (Sampling)# 
#  Elapsed Time: 31.2188 seconds (Warm-up)
#                30.9187 seconds (Sampling)
#                62.1374 seconds (Total)
# 
The following numerical problems occured the indicated number of times after warmup on chain 3
                                                                                count
Exception thrown at line 25: normal_log: Scale parameter is 0, but must be > 0!     3
When a numerical problem occurs, the Hamiltonian proposal gets rejected.
See http://mc-stan.org/misc/warnings.html#exception-hamiltonian-proposal-rejected
If the number in the 'count' column is small, do not ask about this message on stan-users.

> print(m3coop0stan, pars = c("gamma"))
Inference for Stan model: mlma.
4 chains, each with iter=10000; warmup=5000; thin=10; 
post-warmup draws per chain=500, total post-warmup draws=2000.

         mean se_mean   sd  2.5%   25%  50%  75% 97.5% n_eff Rhat
gamma[1] 0.40       0 0.07  0.26  0.35 0.39 0.44  0.53  1312    1
gamma[2] 0.04       0 0.09 -0.12 -0.02 0.04 0.10  0.21  1131    1

Samples were drawn using NUTS(diag_e) at Sun Oct 30 21:02:26 2016.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

> if (rerun) {
+     save(list = ls()[c(grep("stan", ls()), grep("dat", ls()))], 
+         file = "results.Rdata")
+ }
There were 16 warnings (use warnings() to see them)
> 
> ## summary of results
> source("MLMA_summary.R", echo=T, max.deparse.length=10000)

> rm(list = ls())

> library(rstan)

> library(dplyr)

> library(ggplot2)

> library(stargazer)

Please cite as: 

 Hlavac, Marek (2015). stargazer: Well-Formatted Regression and Summary Statistics Tables.
 R package version 5.2. http://CRAN.R-project.org/package=stargazer 


> library(lme4)
Loading required package: Matrix

> rstan_options(auto_write = TRUE)

> options(mc.cores = parallel::detectCores())

> load("results.Rdata")

> lab_beta <- c("Extraversion", "Openness", "Agreeableness", 
+     "Conscientousness", "Neuroticism")

> lab_gamma <- c("(Global) Intercept", "Payment", "Author: Hilbig", 
+     "Author: Ben-Ner", "MBTI Personality Measure", "Cooperative")

> lab_level <- c("Subject", "Study")

> lab_order <- rev(c(lab_beta, lab_gamma))

> lab_study <- c("Brocklebank et al. 2011", "Hilbig/Zettler 2009", 
+     "Hilbig et al. 2012b", "Hilbig et al. 2012a", "Schmitt et al. 2008", 
+     "Swope et al. 2008", "Ben-Ner et al. 2004", "Hirsh/Peterson 2009", 
+     "Pothos et al. 2011", "Ben-Ner/Kramer 2010", "Kurzban/Houser 2001", 
+     "Koole et al. 2001")

> stargazer(data.frame(dat1), title = "Data for Model 1 (12 Studies)", 
+     label = "tab:dat1", out = "tab_dat1.tex", type = "text")

Data for Model 1 (12 Studies)
==========================================
Statistic   N   Mean  St. Dev.  Min   Max 
------------------------------------------
study     2,235 5.510  2.910     1    12  
extro     2,235 0.608  0.171   0.000 1.000
open      2,235 0.615  0.178   0.000 1.000
agree     2,235 0.530  0.177   0.000 1.000
conscien  2,235 0.609  0.169   0.000 1.000
payment   2,235 0.350  0.477     0     1  
hilbig    2,235 0.487  0.500     0     1  
benner    2,235 0.232  0.422     0     1  
mbti      2,235 0.114  0.317     0     1  
coop      2,235 0.349  0.477     0     1  
svo1      2,235 0.462  0.342   0.000 1.000
svo2      2,235 0.568  0.382   0.000 1.000
svoD1     2,235 0.490  0.500     0     1  
svoD2     2,235 0.392  0.488     0     1  
------------------------------------------

> stargazer(data.frame(dat2), title = "Data for Model 2 (10 Studies)", 
+     label = "tab:dat2", out = "tab_dat2.tex", type = "text")

Data for Model 2 (10 Studies)
==========================================
Statistic   N   Mean  St. Dev.  Min   Max 
------------------------------------------
study     1,981 4.674  2.226     1    10  
extro     1,981 0.622  0.152   0.000 1.000
open      1,981 0.629  0.161   0.000 1.000
agree     1,981 0.544  0.162   0.000 1.000
conscien  1,981 0.617  0.155   0.000 1.000
neuro     1,981 0.523  0.166   0.000 1.000
payment   1,981 0.267  0.443     0     1  
hilbig    1,981 0.550  0.498     0     1  
benner    1,981 0.261  0.440     0     1  
coop      1,981 0.369  0.483     0     1  
svo1      1,981 0.449  0.344   0.000 1.000
svo2      1,981 0.535  0.375   0.000 1.000
svoD1     1,981 0.462  0.499     0     1  
svoD2     1,981 0.374  0.484     0     1  
------------------------------------------

> stargazer(data.frame(dat3), title = "Data for Model 3 (15 Studies)", 
+     label = "tab:dat3", out = "tab_dat3.tex", type = "text")

Data for Model 3 (15 Studies)
==========================================
Statistic   N   Mean  St. Dev.  Min   Max 
------------------------------------------
study     2,482 6.658  3.494     1    15  
payment   2,482 0.415  0.493     0     1  
hilbig    2,482 0.439  0.496     0     1  
benner    2,482 0.209  0.406     0     1  
coop      2,482 0.340  0.474     0     1  
svo1      2,482 0.450  0.344   0.000 1.000
svo2      2,482 0.556  0.383   0.000 1.000
svoD1     2,482 0.466  0.499     0     1  
svoD2     2,482 0.375  0.484     0     1  
------------------------------------------

> df1 <- data.frame(summary(m1stan, par = c("beta", 
+     "gamma"))$summary) %>% mutate(Model = "Model 1", var = gsub("\\[\\d*\\]", 
+     "", rownames(.)), Variable = c(lab_beta[1:4], lab_gamma), 
+     Level = factor(var, labels = lab_level))

> df2 <- data.frame(summary(m2stan, par = c("beta", 
+     "gamma"))$summary) %>% mutate(Model = "Model 2", var = gsub("\\[\\d*\\]", 
+     "", rownames(.)), Variable = c(lab_beta, lab_gamma[-5]), 
+     Level = factor(var, labels = lab_level))

> df3 <- data.frame(summary(m3stan, par = c("gamma"))$summary) %>% 
+     mutate(Model = "Model 3", var = gsub("\\[\\d*\\]", "", rownames(.)), 
+         Variable = lab_gamma[c(1, 2, 6)], Level = factor(lab_level[2], 
+             levels = lab_level))

> df_plot <- bind_rows(df1, df2, df3) %>% mutate(Variable = factor(Variable, 
+     levels = lab_order))

> ggplot(df_plot, aes(x = Variable, y = mean, ymin = X2.5., 
+     ymax = X97.5., shape = Level)) + coord_flip() + geom_pointrange() + 
+     theme_bw() + facet_wrap(~Model) + ylab("Estimate") + geom_hline(yintercept = 0, 
+     col = "grey") + theme(legend.position = "bottom")

> ggsave("fig1_original.pdf", width = 7, height = 4)

> df1 <- data.frame(summary(m1svo2stan, par = c("beta", 
+     "gamma"))$summary) %>% mutate(Model = "Model 1", var = gsub("\\[\\d*\\]", 
+     "", rownames(.)), Variable = c(lab_beta[1:4], lab_gamma), 
+     Level = factor(var, labels = lab_level))

> df2 <- data.frame(summary(m2svo2stan, par = c("beta", 
+     "gamma"))$summary) %>% mutate(Model = "Model 2", var = gsub("\\[\\d*\\]", 
+     "", rownames(.)), Variable = c(lab_beta, lab_gamma[-5]), 
+     Level = factor(var, labels = lab_level))

> df3 <- data.frame(summary(m3svo2stan, par = c("gamma"))$summary) %>% 
+     mutate(Model = "Model 3", var = gsub("\\[\\d*\\]", "", rownames(.)), 
+         Variable = lab_gamma[c(1, 2, 6)], Level = factor(lab_level[2], 
+             levels = lab_level))

> df_plot <- bind_rows(df1, df2, df3) %>% mutate(Variable = factor(Variable, 
+     levels = lab_order))

> ggplot(df_plot, aes(x = Variable, y = mean, ymin = X2.5., 
+     ymax = X97.5., shape = Level)) + coord_flip() + geom_pointrange() + 
+     theme_bw() + facet_wrap(~Model) + ylab("Estimate") + geom_hline(yintercept = 0, 
+     col = "grey") + theme(legend.position = "bottom")

> ggsave("fig2_svo.pdf", width = 7, height = 4)

> df1 <- data.frame(summary(m1svoD1stan, par = c("beta", 
+     "gamma"))$summary) %>% rbind(data.frame(summary(m1svoD2stan, 
+     par = c("beta", "gamma"))$summary)) %>% mutate(Model = "Model 1", 
+     var = gsub("\\[\\d*\\]\\d*", "", rownames(.)), Variable = rep(c(lab_beta[1:4], 
+         lab_gamma), 2), Level = factor(var, labels = lab_level), 
+     svo = rep(c("Dichotomized DV (svoD1)", "Dichotomized DV (svoD2)"), 
+         each = nrow(.)/2))

> df2 <- data.frame(summary(m2svoD1stan, par = c("beta", 
+     "gamma"))$summary) %>% rbind(data.frame(summary(m2svoD2stan, 
+     par = c("beta", "gamma"))$summary)) %>% mutate(Model = "Model 2", 
+     var = gsub("\\[\\d*\\]\\d*", "", rownames(.)), Variable = rep(c(lab_beta, 
+         lab_gamma[-5]), 2), Level = factor(var, labels = lab_level), 
+     svo = rep(c("Dichotomized DV (svoD1)", "Dichotomized DV (svoD2)"), 
+         each = nrow(.)/2))

> df3 <- data.frame(summary(m3svoD1stan, par = "gamma")$summary) %>% 
+     rbind(data.frame(summary(m3svoD2stan, par = "gamma")$summary)) %>% 
+     mutate(Model = "Model 3", var = gsub("\\[\\d*\\]\\d*", "", 
+         rownames(.)), Variable = rep(lab_gamma[c(1, 2, 6)], 2), 
+         Level = factor(lab_level[2], levels = lab_level), svo = rep(c("Dichotomized DV (svoD1)", 
+             "Dichotomized DV (svoD2)"), each = nrow(.)/2))

> df_plot <- bind_rows(df1, df2, df3) %>% mutate(Variable = factor(Variable, 
+     levels = lab_order))

> ggplot(df_plot, aes(x = Variable, y = mean, ymin = X2.5., 
+     ymax = X97.5., shape = Level)) + coord_flip() + geom_pointrange() + 
+     theme_bw() + facet_grid(svo ~ Model) + ylab("Estimate") + 
+     geom_hline(yintercept = 0, col = "grey") + theme(legend.position = "bottom")

> ggsave("fig3_logit.pdf", width = 7, height = 5)

> df_prep <- function(x, i = NULL) {
+     out <- data.frame(summary(x, par = c("beta", "gamma"))$summary) %>% 
+         mutate(var = gsub("\\[\\d*\\]", "", rownames(.)), Variable = c(lab_beta[1:4], 
+             lab_gamma), Level = factor(var, labels = lab_level))
+     return(out)
+ }

> df_plot <- m4stan %>% lapply(df_prep) %>% bind_rows() %>% 
+     mutate(Study = rep(lab_study, each = 10), Variable = factor(Variable, 
+         levels = lab_order))

> ggplot(df_plot, aes(x = Variable, y = mean, ymin = X2.5., 
+     ymax = X97.5., shape = Level)) + coord_flip() + geom_pointrange() + 
+     theme_bw() + facet_wrap(~Study, ncol = 3) + ylab("Estimate") + 
+     geom_hline(yintercept = 0, col = "grey") + theme(legend.position = "bottom")

> ggsave("fig4_jackknife.pdf", width = 7, height = 8)

> df_plot <- data.frame(summary(m5stan, par = c("beta_extro", 
+     "beta_open", "beta_agree", "beta_conscien", "mu_beta", "gamma"))$summary) %>% 
+     mutate(var = rownames(.), Variable = factor(c(rep(lab_beta[1:4], 
+         each = 12), lab_beta[1:4], lab_gamma), levels = rev(lab_order)), 
+         Study = factor(c(rep(lab_study, 4), rep("Overall", 4), 
+             rep("Study-level", 6)), levels = c(sort(lab_study), 
+             "Overall", "Study-level")))

> ggplot(df_plot, aes(x = Variable, y = mean, ymin = X2.5., 
+     ymax = X97.5.)) + geom_pointrange() + theme_bw() + facet_wrap(~Study, 
+     scales = "free_x") + ylab("Estimate") + theme(axis.text.x = element_text(angle = 45, 
+     hjust = 1)) + geom_hline(yintercept = 0, col = "grey")

> ggsave("fig5_slopes.pdf", width = 9, height = 11)

> df1 <- data.frame(summary(m1coop0stan, par = c("beta", 
+     "gamma"))$summary) %>% mutate(Model = "Model 1", var = gsub("\\[\\d*\\]", 
+     "", rownames(.)), Variable = c(lab_beta[1:4], lab_gamma[-6]), 
+     Level = factor(var, labels = lab_level))

> df2 <- data.frame(summary(m2coop0stan, par = c("beta", 
+     "gamma"))$summary) %>% mutate(Model = "Model 2", var = gsub("\\[\\d*\\]", 
+     "", rownames(.)), Variable = c(lab_beta, lab_gamma[-5:-6]), 
+     Level = factor(var, labels = lab_level))

> df3 <- data.frame(summary(m3coop0stan, par = c("gamma"))$summary) %>% 
+     mutate(Model = "Model 3", var = gsub("\\[\\d*\\]", "", rownames(.)), 
+         Variable = lab_gamma[c(1, 2)], Level = factor(lab_level[2], 
+             levels = lab_level))

> df_plot <- bind_rows(df1, df2, df3) %>% mutate(Variable = factor(Variable, 
+     levels = lab_order))

> ggplot(df_plot, aes(x = Variable, y = mean, ymin = X2.5., 
+     ymax = X97.5., shape = Level)) + coord_flip() + geom_pointrange() + 
+     theme_bw() + facet_wrap(~Model) + ylab("Estimate") + geom_hline(yintercept = 0, 
+     col = "grey") + theme(legend.position = "bottom")

> ggsave("fig6_cooperative.pdf", width = 7, height = 4)

> m1 <- lmer(svo1 ~ extro + open + agree + conscien + 
+     payment + hilbig + benner + mbti + coop + (1 | study), data = dat1)

> m2 <- lmer(svo1 ~ extro + open + agree + conscien + 
+     neuro + payment + hilbig + benner + coop + (1 | study), data = dat2)

> m3 <- lmer(svo1 ~ payment + coop + (1 | study), data = dat3)

> stargazer(m1, m2, m3, ci = T, covariate.labels = c(lab_beta, 
+     lab_gamma[-1], lab_gamma), label = "tab:mfreq", title = "Frequentist replication of main models (multilevel regression)", 
+     dep.var.labels = "Prosociality", keep.stat = "n", star.cutoffs = NA, 
+     omit.table.layout = "n", out = "tab_mfreq.tex", type = "text")

Frequentist replication of main models (multilevel regression)
========================================================================
                                       Dependent variable:              
                         -----------------------------------------------
                                          Prosociality                  
                               (1)             (2)             (3)      
------------------------------------------------------------------------
Extraversion                 -0.017          -0.061                     
                         (-0.096, 0.062) (-0.155, 0.034)                
                                                                        
Openness                      0.136           0.233                     
                         (0.053, 0.219)  (0.134, 0.332)                 
                                                                        
Agreeableness                 0.123           0.161                     
                         (0.039, 0.208)  (0.061, 0.262)                 
                                                                        
Conscientousness             -0.053          -0.072                     
                         (-0.134, 0.029) (-0.168, 0.025)                
                                                                        
Neuroticism                                  -0.054                     
                                         (-0.144, 0.036)                
                                                                        
Payment                       0.181           0.178           0.052     
                         (-0.025, 0.387) (-0.040, 0.397) (-0.113, 0.217)
                                                                        
Author: Hilbig                0.254           0.236                     
                         (0.017, 0.491)  (-0.041, 0.513)                
                                                                        
Author: Ben-Ner              -0.045          -0.083                     
                         (-0.282, 0.192) (-0.384, 0.218)                
                                                                        
MBTI Personality Measure      0.169                                     
                         (-0.074, 0.413)                                
                                                                        
Cooperative                   0.076           0.036           0.071     
                         (-0.022, 0.174) (-0.198, 0.271) (-0.021, 0.163)
                                                                        
(Global) Intercept            0.124           0.143           0.359     
                         (-0.087, 0.335) (-0.159, 0.446) (0.224, 0.495) 
                                                                        
------------------------------------------------------------------------
Observations                  2,235           1,981           2,482     
========================================================================

> traceplot(m1stan, ncol = 3) + ggtitle("Model 1")

> ggsave("fig_trace1.pdf")
Saving 7 x 7 in image

> traceplot(m2stan, ncol = 3) + ggtitle("Model 2")

> ggsave("fig_trace2.pdf")
Saving 7 x 7 in image

> traceplot(m3stan, pars = "gamma", ncol = 3) + ggtitle("Model 3")

> ggsave("fig_trace3.pdf")
Saving 7 x 7 in image
> 
> proc.time()
    user   system  elapsed 
  24.132    0.908 5760.411 
